iT邦幫忙

2021 iThome 鐵人賽

DAY 19
0
Modern Web

30 天我與 Vue 的那些二三事系列 第 19

Day 19 - 在SQL server 建立Table以及設計資料表

  • 分享至 

  • xImage
  •  

昨天我們講到如何在SQL server建立DB,但像是Table、Column之類的該如何建置呢,很簡單,透過SSMS,透可以輕鬆幫你建立。

https://ithelp.ithome.com.tw/upload/images/20211004/20128925G7mL9ztcEX.png

還記得我們昨天的表格設計圖嗎?
https://ithelp.ithome.com.tw/upload/images/20211004/20128925ChZLtB9HI2.png

點選完新增資料表之後,跳出的頁面便可以讓你設計資料表的欄位、型態等等。

我們便依樣畫葫蘆建立這兩個Table,
spending:
https://ithelp.ithome.com.tw/upload/images/20211004/20128925pPHTGOozUT.png
member:
https://ithelp.ithome.com.tw/upload/images/20211004/20128925ldaymZgnP5.png

兩個表格都建立完之後,緊接著我們要來建立外鍵關聯(FK)
在設計頁面上點選右鍵選擇關聯性:
https://ithelp.ithome.com.tw/upload/images/20211004/20128925ktgyn4U3vO.png

跳出畫面後選擇加入新的FK:
https://ithelp.ithome.com.tw/upload/images/20211004/20128925o5ynri5r6P.png

https://ithelp.ithome.com.tw/upload/images/20211004/20128925y36G13KWdG.png


Hi, I am Grant.

個人部落格 - https://grantliblog.wordpress.com/
個人網站 - https://grantli-website.netlify.app/#/mainpage
我的寫作專題 - https://vocus.cc/user/5af2e9b5fd89780001822db4#


上一篇
Day 18 - MSSQL 基本 & 工具介紹
下一篇
Day 20 - 規劃各功能模組的介面
系列文
30 天我與 Vue 的那些二三事30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言